package com.raymond.client.utils;

import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 获取序列号工具类
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2021-07-14 14:24
 */
public class SequenceIdUtil {
    /**
     * 序列号
     */
    private static AtomicInteger sequenceId = new AtomicInteger(new Random(1).nextInt(100000));

    public static int getSequenceId() {
        return sequenceId.getAndIncrement() & 0x7FFFFFFF;
    }
}
